package com.lht.designPattern.state;

/**
 * @author Eric
 * @version 1.0
 * @date 2019-10-12
 */
public class InitiatePayState implements OrderState {

    @Override
    public boolean isChange(Order order, Integer state) {
        return order.getOrderState() == 1 && state == 2;
    }

    @Override
    public void change(Order order, Integer state) {
        order.setOrderState(2);
        System.out.println("用户状态从 等支付到 发起支付逻辑");
    }

}
